#include "BulletCollision/Gimpact/btGImpactBvh.h"
#ifdef __cplusplus
extern "C" {
#endif
btGImpactBvh* bullet_NewbtGImpactBvh(){
	btGImpactBvh* wrap_out = new btGImpactBvh();
	return wrap_out;
}

btGImpactBvh* bullet_NewbtGImpactBvh1(btPrimitiveManagerBase* primitive_manager){
	btPrimitiveManagerBase * c_arg_primitive_manager=(btPrimitiveManagerBase *)(void*)(primitive_manager);
	btGImpactBvh* wrap_out = new btGImpactBvh(c_arg_primitive_manager);
	return wrap_out;
}

void bullet_btGImpactBvh_buildSet(btGImpactBvh* c_this){
	c_this->buildSet();
}

GIM_BVH_TREE_NODE* bullet_btGImpactBvh_get_node_pointer(btGImpactBvh* c_this,int index){
	int c_arg_index=index;
	GIM_BVH_TREE_NODE const * c_out = c_this->get_node_pointer(c_arg_index);
	GIM_BVH_TREE_NODE* wrap_out = (GIM_BVH_TREE_NODE*)(void*)(c_out);
	return wrap_out;
}

int bullet_btGImpactBvh_getEscapeNodeIndex(btGImpactBvh* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getEscapeNodeIndex(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

btAABB* bullet_btGImpactBvh_getGlobalBox(btGImpactBvh* c_this){
	btAABB c_out = c_this->getGlobalBox();
	btAABB* wrap_out = new btAABB(c_out);
	return wrap_out;
}

int bullet_btGImpactBvh_getLeftNode(btGImpactBvh* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getLeftNode(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

void bullet_btGImpactBvh_getNodeBound(btGImpactBvh* c_this,int nodeindex,btAABB* bound){
	int c_arg_nodeindex=nodeindex;
	btAABB& c_arg_bound=(btAABB&)(*bound);
	c_this->getNodeBound(c_arg_nodeindex,c_arg_bound);
}

int bullet_btGImpactBvh_getNodeCount(btGImpactBvh* c_this){
	int c_out = c_this->getNodeCount();
	int wrap_out = (c_out);
	return wrap_out;
}

int bullet_btGImpactBvh_getNodeData(btGImpactBvh* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getNodeData(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

void bullet_btGImpactBvh_getNodeTriangle(btGImpactBvh* c_this,int nodeindex,btPrimitiveTriangle* triangle){
	int c_arg_nodeindex=nodeindex;
	btPrimitiveTriangle& c_arg_triangle=(btPrimitiveTriangle&)(*triangle);
	c_this->getNodeTriangle(c_arg_nodeindex,c_arg_triangle);
}

int bullet_btGImpactBvh_getRightNode(btGImpactBvh* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getRightNode(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btGImpactBvh_hasHierarchy(btGImpactBvh* c_this){
	bool c_out = c_this->hasHierarchy();
	bool wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btGImpactBvh_isLeafNode(btGImpactBvh* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	bool c_out = c_this->isLeafNode(c_arg_nodeindex);
	bool wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btGImpactBvh_isTrimesh(btGImpactBvh* c_this){
	bool c_out = c_this->isTrimesh();
	bool wrap_out = (c_out);
	return wrap_out;
}

void bullet_btGImpactBvh_setNodeBound(btGImpactBvh* c_this,int nodeindex,btAABB* bound){
	int c_arg_nodeindex=nodeindex;
	btAABB const& c_arg_bound=(btAABB const&)(*bound);
	c_this->setNodeBound(c_arg_nodeindex,c_arg_bound);
}

void bullet_btGImpactBvh_setPrimitiveManager(btGImpactBvh* c_this,btPrimitiveManagerBase* primitive_manager){
	btPrimitiveManagerBase * c_arg_primitive_manager=(btPrimitiveManagerBase *)(void*)(primitive_manager);
	c_this->setPrimitiveManager(c_arg_primitive_manager);
}

void bullet_btGImpactBvh_update(btGImpactBvh* c_this){
	c_this->update();
}

btBvhTree* bullet_NewbtBvhTree(){
	btBvhTree* wrap_out = new btBvhTree();
	return wrap_out;
}

void bullet_btBvhTree_clearNodes(btBvhTree* c_this){
	c_this->clearNodes();
}

GIM_BVH_TREE_NODE* bullet_btBvhTree_get_node_pointer(btBvhTree* c_this,int index){
	int c_arg_index=index;
	GIM_BVH_TREE_NODE const * c_out = c_this->get_node_pointer(c_arg_index);
	GIM_BVH_TREE_NODE* wrap_out = (GIM_BVH_TREE_NODE*)(void*)(c_out);
	return wrap_out;
}

int bullet_btBvhTree_getEscapeNodeIndex(btBvhTree* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getEscapeNodeIndex(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

int bullet_btBvhTree_getLeftNode(btBvhTree* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getLeftNode(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

void bullet_btBvhTree_getNodeBound(btBvhTree* c_this,int nodeindex,btAABB* bound){
	int c_arg_nodeindex=nodeindex;
	btAABB& c_arg_bound=(btAABB&)(*bound);
	c_this->getNodeBound(c_arg_nodeindex,c_arg_bound);
}

int bullet_btBvhTree_getNodeCount(btBvhTree* c_this){
	int c_out = c_this->getNodeCount();
	int wrap_out = (c_out);
	return wrap_out;
}

int bullet_btBvhTree_getNodeData(btBvhTree* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getNodeData(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

int bullet_btBvhTree_getRightNode(btBvhTree* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getRightNode(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btBvhTree_isLeafNode(btBvhTree* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	bool c_out = c_this->isLeafNode(c_arg_nodeindex);
	bool wrap_out = (c_out);
	return wrap_out;
}

void bullet_btBvhTree_setNodeBound(btBvhTree* c_this,int nodeindex,btAABB* bound){
	int c_arg_nodeindex=nodeindex;
	btAABB const& c_arg_bound=(btAABB const&)(*bound);
	c_this->setNodeBound(c_arg_nodeindex,c_arg_bound);
}

#ifdef __cplusplus
}
#endif
